﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:tree="clr-namespace:Aga.Controls.Tree;assembly=Aga.Controls">

	<Style TargetType="{x:Type tree:TreeListItem}">
		<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}"/>
	</Style>

	<Style TargetType="{x:Type tree:TreeListItem}" x:Key="TreeListItemNodeStyle">
		<Setter Property="IsSelected" Value="{Binding IsSelected, Mode=TwoWay}"/>
		<Setter Property="FocusVisualStyle" Value="{x:Null}"/>
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate>
					<ContentPresenter Content="{TemplateBinding ContentControl.Content}" 
										  ContentTemplate="{TemplateBinding ContentControl.ContentTemplate}" 
										  HorizontalAlignment="{TemplateBinding Control.HorizontalContentAlignment}" 
										  VerticalAlignment="{TemplateBinding Control.VerticalContentAlignment}" 
										  SnapsToDevicePixels="{TemplateBinding UIElement.SnapsToDevicePixels}" />
					<ControlTemplate.Triggers>
						<Trigger Property="UIElement.IsEnabled" Value="False">
							<Setter Property="TextElement.Foreground">
								<Setter.Value>
									<DynamicResource ResourceKey="{x:Static SystemColors.GrayTextBrushKey}" />
								</Setter.Value>
							</Setter>
						</Trigger>
					</ControlTemplate.Triggers>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>

</ResourceDictionary>